@extends('admin.admin')

@section('content')
        <!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        商品属性设置
        <small>修改</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 控制面板</a></li>
        <li class="active">商品属性设置</li>
    </ol>
</section>

<!-- Main content -->
<section class="content">

    <div class="row">
        <div class="col-xs-12">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">商品属性修改</h3>
                    <div class="box-tools">
                        <a href="{{Route('admin.goods_attribute.index')}}" type="button" class="btn btn-block btn-success btn-xs"><i class="icon  glyphicon glyphicon glyphicon-menu-left"></i> 返回</a>
                    </div>
                </div>
                <!-- /.box-header -->
                <!-- form start -->
                {!! Form::model($goodsAttribute,['route'=>['admin.goods_attribute.update',$goodsAttribute->attribute_id],'method'=>'put'])  !!}
                    {!! Form::hidden('back_url',@$_SERVER['HTTP_REFERER']) !!}
                    <div class="box-body">

                        <div class="form-group @if($errors->has('attribute_name')) has-error   @endif">
                            <label for="exampleInputEmail1">商品属性名称</label>
                            {!! Form::text('attribute_name',old('attribute_name'),array('class'=>'form-control','placeholder'=>'商品属性名称'))!!}
                            @if($errors->has('attribute_name'))
                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('attribute_name')}}</label>
                            @endif
                        </div>

                        <div class="form-group @if($errors->has('type_name')) has-error   @endif">
                            <label for="exampleInputEmail1">商品类型</label>
                            {!! Form::text('type_name',old('type_name'),array('class'=>'form-control','placeholder'=>'商品类型名称'))!!}
                            @if($errors->has('type_name'))
                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('type_name')}}</label>
                            @endif
                        </div>

                        <div class="form-group @if($errors->has('attribute_input_type')) has-error   @endif">
                            <label for="exampleInputEmail1">属性值录入方式</label>
                            {!! Form::text('attribute_input_type',old('attribute_input_type'),array('class'=>'form-control','placeholder'=>'属性值录入方式'))!!}
                            @if($errors->has('attribute_input_type'))
                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('attribute_input_type')}}</label>
                            @endif
                        </div>

                        <div class="form-group @if($errors->has('attribute_values')) has-error   @endif">
                            <label for="exampleInputEmail1">属性可选值</label>
                            {!! Form::text('attribute_values',old('attribute_values'),array('class'=>'form-control','placeholder'=>'商品类型名称'))!!}
                            @if($errors->has('attribute_values'))
                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('attribute_values')}}</label>
                            @endif
                        </div>
                        
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer">
                        <button type="submit" class="btn btn-primary">保存</button>
                    </div>
                {!! Form::close()  !!}
            </div>
            <!-- /.box -->
        </div>
    </div>



</section>
<!-- /.content -->
@endsection